Conversation
| type NormalCssProperties = CSSProperties<string | number> | ||
| type NormalCssValues<K> = K extends keyof NormalCssProperties | ||
| ? NormalCssProperties[K] | JssValue | ||
| ? NormalCssProperties[K] |
There was a problem hiding this comment.
This seems as a breaking change.. why removing it?
There was a problem hiding this comment.
JssValue in there converting NormalCssValues to any.
I think that not needed because when the key is a key of NormalCssProperties we should respond type of that key
There was a problem hiding this comment.
I agree but this can be a breaking change for some users. If that not required I prefer to remove it and maybe push it on a separate PR as breaking change.
There was a problem hiding this comment.
i have used jss in huge typescript project, there is nothing broke.
There was a problem hiding this comment.
Still, if someone use a type that's not defined on the standard properties from some reason it will break. No sure if this consider a break or a fix, but I remember some complains in the past about this. NormalCssProperties is not perfect for all properties.
There was a problem hiding this comment.
we can probably use for this the new TS feature and identify nesting by "&"
There was a problem hiding this comment.
However, you can merge this PR, and we can continue to discuss in an issue.
There was a problem hiding this comment.
@moshest seems like we can merge it since because of flexible JssValue it should be breaking it right now, but please check it out, I have no code base in TS using it to do so.
There was a problem hiding this comment.
I don't have time to test it right now but I'm ok with merging it. It should be fine for most users anyway..
|
merged! thank you |

Corresponding issue (if exists):
Typescript not working I changed import from
csstypeand now that workingWhat would you like to add/fix?
Todo